﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class uc_main_menu_canhan : System.Web.UI.UserControl
{
    CommonPage cm3 = new CommonPage();
    VLGDataContext _dataContext = new VLGDataContext();
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            var acc = _dataContext.VLGAccounts.Single(c => c.idAcc == cm3.Customer.idAcc);
            var total = acc.soTien + acc.soTienPaypal;
            if (total.HasValue)
                ltrTotalMoney.Text = "($" + total.ToString() + ")";
        }
        catch {
            Response.Redirect(ResolveClientUrl("~/warnLogin.aspx"));
        }
    }
}
